﻿#pragma once
#include "Transform.h"
#include "string"

namespace DYEngine
{
	class GameObject;

	class Component
	{
	public:
		Component();
		Transform* GetTransform();
		virtual ~Component();	// 不做任何事情
	public:
		virtual void Init() = 0;
		virtual void Enable() = 0;
		virtual void Update() = 0;
		virtual void Disable() = 0;
		virtual void Destroy() = 0;
	protected:
		friend class GameObject;
		GameObject* mGameObject;
		std::string name;
		bool mIsDestroy;
	};
}